home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_casm / jlvesa11.zip / JLVESA01.ASM < prev    next >
Assembly Source File  |  1995-11-14  |  1KB  |  54 lines

  1. ; This routine is part of VESA SVGA -library
  2. ;
  3. ; Copyright 1994 Johannes Lehtinen
  4. ; All rights reserved
  5.  
  6. model large,c
  7. p386
  8.  
  9. segment jlvesa01_TEXT USE16 'CODE'
  10. assume cs:jlvesa01_TEXT
  11.  
  12. ; JVFlag JVSVGA_GetModeInfo(JVUWord mode, JVModeInfo *info)
  13. ;
  14. ; Get information of VESA-mode. Returns 0 if succesfull, 1 if failed
  15.  
  16. proc JVSVGA_GetModeInfo far
  17.    public JVSVGA_GetModeInfo
  18.  
  19.    push  bp
  20.    push  di
  21.    push  es
  22.  
  23.    ; Call VESA function
  24.  
  25.    mov   bp,sp
  26.    mov   cx,[ss:bp+10]        ; CX = Mode
  27.    mov   di,[ss:bp+12]        ; ES:DI = Pointer to information
  28.    mov   ax,[ss:bp+14]
  29.    mov   es,ax
  30.    mov   ax,4f01H             ; AX = Function number
  31.    int   10H                  ; Call VESA function
  32.  
  33.    ; Check if everything was succesfull
  34.  
  35.    cmp   ax,4fH               ; AX should be 4fH if succesfull
  36.    je    short no_error       ; Succesfull
  37.  
  38.    mov   ah,1                 ; Error -> return 1
  39.  
  40.    ; Return
  41.  
  42. no_error:
  43.    pop   es
  44.    pop   di
  45.    pop   bp
  46.    mov   al,ah
  47.    retf
  48.  
  49. endp JVSVGA_GetModeInfo
  50.  
  51. ends
  52.  
  53. end
  54.